package models

// 活动锦鲤号码表
type MaLotteryCode struct {
	ID         string `gorm:"primaryKey;column:id;autoIncrement;type:bigint ;not null;comment:唯一ID" json:"id" json_old:"ID"`
	ActivityID string `gorm:"column:activity_id;type:bigint;comment:活动ID" json:"activity_id"`
	Code       string `gorm:"column:code;unique;type:varchar(100);not null;comment:锦鲤号码" json:"code"`
	MemberID   string `gorm:"column:member_id;type:bigint;not null;comment:用户ID" json:"member_id"`
	Phone      string `gorm:"column:phone;type:varchar(100);not null;comment:用户手机号" json:"phone"`
	SalesID    string `gorm:"column:sales_id;type:varchar(100);not null;comment:机器识别码" json:"sales_id"`
	OutTradeNo string `gorm:"column:out_trade_no;type:varchar(50);not null;comment:抽奖订单号" json:"out_trade_no"`

	CreatedAt int64 `gorm:"column:created_at;autoCreateTime;type:int;size:64;comment:创建时间" json:"created_at"`
	UpdatedAt int64 `gorm:"column:updated_at;autoUpdateTime;type:int;size:64;comment:修改时间" json:"updated_at"`
	DeletedAt int64 `gorm:"column:deleted_at;type:int;size:64;default:0;comment:删除时间" json:"deleted_at"`
}

func (m MaLotteryCode) TableName() string {
	return "ma_lottery_code"
}
